From: Florian Müllner Date: Tue, 9 Mar 2021 19:48:47 +0000 (+0100) Subject: messageTray: Remove deprecated code X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~616^2^2~144 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=16c7739170ffb0dd59f75f16d65bc8a97bd2033e;p=gnome-shell.git messageTray: Remove deprecated code Originally the Source method for showing notifications was "notify", which had to change when turning it into a GObject subclass to not clash with g_object_notify(). That change happened during the 3.36 cycle, so extensions have had two releases (a year) to adapt to the replacement. That seems long enough, so remove the deprecated compat code. https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3848 Part-of: --- diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js index ae7f2ca2a..1dab00a70 100644 --- a/js/ui/messageTray.js +++ b/js/ui/messageTray.js @@ -703,7 +703,7 @@ var Source = GObject.registerClass({ } countUpdated() { - super.notify('count'); + this.notify('count'); } _createPolicy() { @@ -775,21 +775,6 @@ var Source = GObject.registerClass({ this.emit('notification-show', notification); } - notify(propName) { - if (propName instanceof Notification) { - try { - throw new Error('Source.notify() has been moved to Source.showNotification()' + - 'this code will break in the future'); - } catch (e) { - logError(e); - this.showNotification(propName); - return; - } - } - - super.notify(propName); - } - destroy(reason) { let notifications = this.notifications; this.notifications = [];